-- GENERATED SPELL FOR [Trapdoor Ambusher] --


function spell0_28342(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(21067,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28342', 12500, 1)
end

function spell1_28342(pUnit, Event) --@Web,n/a--
pUnit:FullCastSpellOnTarget(745,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28342', 5254, 1)
end

function Sorts_28342(pUnit, Event)
local choix_sorts_28342 = math.random(0, 1)
if choix_sorts_28342 == 0 then
pUnit:RegisterEvent('spell0_28342', 1, 1)
end
if choix_sorts_28342 == 1 then
pUnit:RegisterEvent('spell1_28342', 1, 1)
end
end

function mob28342_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28342', math.random(1500, 3000), 1)
end

function mob28342_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28342_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28342_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28342, 1, 'mob28342_Action')
RegisterUnitEvent(28342, 2, 'mob28342_Leave')
RegisterUnitEvent(28342, 3, 'mob28342_Kill')
RegisterUnitEvent(28342, 4, 'mob28342_Die')
